/*
 * susidemo F-Key
 * susi is a Arduino communication library for communication with SUSI decoder modules
 * SUSI is a Trademark of DIETZ Modellbahntechnik www.d-i-e-t-z.de
 * Licensed for use under the terms of the GNU General Public License v3
 * V0.1 	MM 20.02.2013
 * 20.02.2013, Mark Martin, Munich, Germany
 * URC Project
 */

#include <susi.h>

susi susi( 8, 9 );               //use pin 8 as DT; pin 9 as CK

void setup() {
  susi.begin();
  delay(100);                    //wait for init of susi module
}

void loop() {
  susi.everyloop();
  switch( millis()) {
    case 2000:
      susi.sendF0F4( B00000100 );    //send F2
      break;
    case 4000:
      susi.sendF0F4( B00000010 );    //send F1
      break;
    case 8000:
      susi.sendF0F4( B00000110 );    //send F1 + F2
      break;
    case 12000:
      susi.sendF0F4( B00000000 );    //all off
      break;
  }
  }

